package top.myliangsl.newsapplets.configuration.properties;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

/**
 * 京东 万象API配置
 *
 * @author xiaoliang
 */
@Data
@Component
@ConfigurationProperties("jd.api")
public class JdApiProperties {

    private String appKey;

    /**
     * 获取新闻列表URL
     */
    private String newsApiUrl = "https://way.jd.com/jisuapi/get?channel=%s&num=%s&start=%s&appkey=%s";

    /**
     * 获取新闻渠道URL
     */
    private String newsChannelApiUrl = "https://way.jd.com/jisuapi/channel?appkey=%s";

    /**
     * 搜索新闻URL
     */
    private String searchNewsApiUrl = "https://way.jd.com/jisuapi/newSearch?keyword=%s&appkey=%s";
}
